package main

import "fmt"

func main() {
	a := []int{1, 4, 9, 16, 2, 5, 10, 15}
	var b []int

	for i := 0; i < len(a)-1; i++ {
		b = append(b, a[i]+a[i+1])
	}

	fmt.Println("原始数组：", a)
	fmt.Println("新切片：", b)
}
